/**
 * 
 */
package com.alibaba.hello.validate;

import org.springmodules.validation.valang.functions.AbstractFunction;
import org.springmodules.validation.valang.functions.Function;

/**
 * @author sesame.yangj
 * 
 */
public class AnotherLengthFunction extends AbstractFunction {

	public AnotherLengthFunction(Function[] arguments, int line, int column) {
		super(arguments, line, column);
		this.definedMaxNumberOfArguments(1);
	}

	protected Object doGetResult(Object target) throws Exception {
		String value = getArguments()[0].getResult(target).toString();
		return new Integer(value.length());
	}

}
